<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/11/24
 * Time: 19:07
 */
namespace app\common\model;

use think\Model;

class Role extends Model
{
    protected $createTime = 'add_time';

    public static function get_role_title($user_id)
    {
        if (!$user_id) {
            return '';
        }

        $role_user_info = _uri('role_user', array('user_id'=>$user_id));

        return display_title('role', $role_user_info['role_id']);
    }
}